#include "Device/Led.h"

#define LedPort P1

void LedLightOnAll()
{
	PortZero(LedPort);
}

void LedLightOnOne(uint8 pos)
{
	if(pos>7)
		return;
	PortSet(LedPort,0,pos);
}


void LedLightOnSome(const uint8 pos[],uint8 count)
{
	uint8 i;
	if(count>8)
		return;
	for(i=0;i<count;++i)
		LedLightOnOne(pos[i]);
}

void LedBurnOutAll()
{
	PortReset(LedPort);
}


void LedBurnOutOne(uint8 pos)
{
	if(pos>7)
		return;
	PortSet(LedPort,1,pos);
}


void LedBurnOutSome(uint8 pos[],uint8 count)
{
	uint8 i;
	if(count>8)
		return;
	for(i=0;i<count;++i)
		LedBurnOutOne(pos[i]);
}

void LedLightOnNumber(uint8 n)
{
	LedPort=~n;
}